﻿package mortal.game.view.lotteryDraw
{
    import Message.Public.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;
    import mortal.game.view.vip.*;

    public class lotteryDrawUtil extends Object
    {
        public static const needLevel:int = GameDefConfig.instance.getSystemOpenLevel(85);
        public static const needVipLevel:int = VipUtil.getVipMinLevelByType(49);

        public function lotteryDrawUtil()
        {
            return;
        }// end function

        public static function checkCanOpen() : Boolean
        {
            if (checkVipType() && checkLevel())
            {
                return true;
            }
            return false;
        }// end function

        public static function checkVipType() : Boolean
        {
            return true;
        }// end function

        public static function checkLevel() : Boolean
        {
            var _loc_1:* = Cache.instance.role.entityInfo.level;
            if (_loc_1 >= needLevel)
            {
                return true;
            }
            return false;
        }// end function

        public static function checkDate() : Boolean
        {
            return true;
        }// end function

        public static function getRoleProxyName(param1:SEntityId) : String
        {
            return NameUtil.getProxyName(param1);
        }// end function

        public static function getStrCode(param1:int, param2:Boolean = true) : int
        {
            var _loc_3:int = 0;
            switch(param1)
            {
                case EEntityAttribute._EAttributeGoldPoint50:
                {
                    _loc_3 = param2 ? (90301) : (90302);
                    break;
                }
                case EEntityAttribute._EAttributeGoldPoint70:
                {
                    _loc_3 = param2 ? (90303) : (90304);
                    break;
                }
                case EEntityAttribute._EAttributeGoldPoint90:
                {
                    _loc_3 = param2 ? (90305) : (90306);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_3;
        }// end function

    }
}
